<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
	DAO dao = DAO.getInstance();
	String charName = request.getParameter("charName");
	int modelNo = Integer.parseInt(request.getParameter("modelNo").toString());
	System.out.println("선택한 모델은 : " + modelNo);

	String accountID = (String)session.getAttribute("accountID");
	int serverNo = (Integer)session.getAttribute("serverNo");
	System.out.println(dao.createCharacter( serverNo, accountID, charName, modelNo ));
	response.sendRedirect("../jsp/selectCharacter.jsp");

%>
</body>
</html>